package com.betterjr.modules.temhandler.entity;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.betterjr.common.annotation.MetaData;
import com.betterjr.common.entity.BetterjrEntity;

@Access(AccessType.FIELD)
@Entity
@Table(name = "t_tem_busin_relation")
public class TemBusinRelation implements BetterjrEntity {

    /** 
     * @Fields serialVersionUID : 
     */
    private static final long serialVersionUID = -5738544091357192616L;

    /**
     * 流水号
     */
    @Id
    @Column(name = "ID", columnDefinition = "INTEGER")
    @MetaData(value = "流水号", comments = "流水号")
    private Long id;

    /**
     * 业务表属性名称   业务表属性
     */
    @Column(name = "c_businTable_property", columnDefinition = "VARCHAR")
    @MetaData(value = "业务表属性名称   业务表属性", comments = "业务表属性名称   业务表属性")
    private String businTableProperty;

    /**
     * 临时表属性名称   临时表属性
     */
    @Column(name = "c_temTable_property", columnDefinition = "VARCHAR")
    @MetaData(value = "临时表属性名称   临时表属性", comments = "临时表属性名称   临时表属性")
    private String temTableProperty;

    /**
     * class类全路径       业务表属性pojo
     */
    @Column(name = "c_classUrl", columnDefinition = "VARCHAR")
    @MetaData(value = "class类全路径       业务表属性pojo", comments = "class类全路径       业务表属性pojo")
    private String classUrl;

    /**
     * 数据状态       1正常   9 已失效
     */
    @Column(name = "c_busin_status", columnDefinition = "VARCHAR")
    @MetaData(value = "数据状态       1正常   9 已失效", comments = "数据状态       1正常   9 已失效")
    private String businStatus;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBusinTableProperty() {
        return businTableProperty;
    }

    public void setBusinTableProperty(String businTableProperty) {
        this.businTableProperty = businTableProperty;
    }

    public String getTemTableProperty() {
        return temTableProperty;
    }

    public void setTemTableProperty(String temTableProperty) {
        this.temTableProperty = temTableProperty;
    }

    public String getClassUrl() {
        return classUrl;
    }

    public void setClassUrl(String classUrl) {
        this.classUrl = classUrl;
    }

    public String getBusinStatus() {
        return businStatus;
    }

    public void setBusinStatus(String businStatus) {
        this.businStatus = businStatus;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((businStatus == null) ? 0 : businStatus.hashCode());
        result = prime * result + ((businTableProperty == null) ? 0 : businTableProperty.hashCode());
        result = prime * result + ((classUrl == null) ? 0 : classUrl.hashCode());
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((temTableProperty == null) ? 0 : temTableProperty.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof TemBusinRelation)) {
            return false;
        }
        TemBusinRelation other = (TemBusinRelation) obj;
        if (businStatus == null) {
            if (other.businStatus != null) {
                return false;
            }
        } else if (!businStatus.equals(other.businStatus)) {
            return false;
        }
        if (businTableProperty == null) {
            if (other.businTableProperty != null) {
                return false;
            }
        } else if (!businTableProperty.equals(other.businTableProperty)) {
            return false;
        }
        if (classUrl == null) {
            if (other.classUrl != null) {
                return false;
            }
        } else if (!classUrl.equals(other.classUrl)) {
            return false;
        }
        if (id == null) {
            if (other.id != null) {
                return false;
            }
        } else if (!id.equals(other.id)) {
            return false;
        }
        if (temTableProperty == null) {
            if (other.temTableProperty != null) {
                return false;
            }
        } else if (!temTableProperty.equals(other.temTableProperty)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "TemBusinRelation [id=" + id + ", businTableProperty=" + businTableProperty + ", temTableProperty="
                + temTableProperty + ", classUrl=" + classUrl + ", businStatus=" + businStatus + "]";
    }

}
